Cystic fibrosis (CF) is a fatal genetic disease caused by mutations in the gene encoding the CF transmembrane conductance regulator (CFTR), a protein kinase A (PKA)-activated epithelial anion channel involved in salt and fluid transport in multiple organs, including the lung. Most CF mutations either reduce the number of CFTR channels at the cell surface (e.g., synthesis or processing mutations) or impair channel function (e.g., gating or conductance mutations) or both. There are currently no approved therapies that target CFTR directly. The present invention discloses compounds which restore or enhance the function of mutant and/or wild type CFTR to treat cystic fibrosis, primary ciliary dyskinesia, chronic bronchitis, chronic obstructive pulmonary disease, asthma, respiratory tract infections, lung carcinoma, xerostomia and keratoconjunctivitis sire, or constipation (IBS, IBD, opioid induced).